import request from "@/utils/request";

// 参数列表
export function apiGlobalList() {
    return request({
        url: "/monitor/global-list",
        method: "get",
    });
}

// 参数修改
export function apiGlobalUpdate(data) {
    return request({
        url: "/monitor/global-update",
        method: "post",
        data: data,
    });
}

// 主机列表
export function apiHostList() {
    return request({
        url: "/monitor/host-list",
        method: "get",
    });
}

// 主机修改
export function apiHostUpdate(data) {
    return request({
        url: "/monitor/host-update",
        method: "post",
        data: data,
    });
}

// 主机复制
export function apiHostCopy(data) {
    return request({
        url: "/monitor/host-copy",
        method: "post",
        data: data,
    });
}

// 作业列表	/monitor/job-list
export function apiJobList() {
    return request({
        url: "/monitor/job-list",
        method: "get",
    });
}

// 作业修改
export function apiJobUpdate(data) {
    return request({
        url: "/monitor/job-update",
        method: "post",
        data: data,
    });
}

// 作业复制	/monitor/job-copy
export function apiJobCopy(data) {
    return request({
        url: "/monitor/job-copy",
        method: "post",
        data: data,
    });
}

// 作业删除
export function apiJobDelete(data) {
    return request({
        url: "/monitor/job-delete",
        method: "post",
        data: data,
    });
}

// 作业上线	/monitor/job-enable
export function apiJobEnable(data) {
    return request({
        url: "/monitor/job-enable",
        method: "post",
        data: data,
    });
}

// 作业下线
export function apiJobDisable(data) {
    return request({
        url: "/monitor/job-disable",
        method: "post",
        data: data,
    });
}

// 作业重排序	/monitor/job-resort
export function apiJobResort(data) {
    return request({
        url: "/monitor/job-resort",
        method: "post",
        data: data,
    });
}

// 新增计划
export function apiPlanCreate(data) {
    return request({
        url: "/monitor/plan-create",
        method: "post",
        data: data,
    });
}

// 启用计划
export function apiPlanEnable(data) {
    return request({
        url: "/monitor/plan-enable",
        method: "post",
        data: data,
    });
}

// 撤消计划
export function apiPlanDisable(data) {
    return request({
        url: "/monitor/plan-disable",
        method: "post",
        data: data,
    });
}

// 删除计划
export function apiPlanDelete(data) {
    return request({
        url: "/monitor/plan-delete",
        method: "post",
        data: data,
    });
}

// 更新依赖	/monitor/dependence-update
export function apiDependenceUpdate(data) {
    return request({
        url: "/monitor/dependence-update",
        method: "post",
        data: data,
    });
}

// 删除依赖
export function apiDependenceDelete(data) {
    return request({
        url: "/monitor/dependence-delete",
        method: "post",
        data: data,
    });
}

// 获取任务记录
export function apiTaskList(data) {
    return request({
        url: "/monitor/task-list",
        method: "post",
        data: data,
    });
}

// 获取子任务记录
export function apiChildrenTaskList(data) {
    return request({
        url: "/monitor/children-task-list",
        method: "post",
        data: data,
    });
}

// 任务运行日志
export function apiReadTaskLog(data) {
    return request({
        url: "/monitor/task-log",
        method: "post",
        data: data,
    });
}

// 撤销任务
export function apiTaskCancel(data) {
    return request({
        url: "/monitor/task-cancel",
        method: "post",
        data: data,
    });
}

// 创建任务
export function apiTaskCreate(data) {
    return request({
        url: "/monitor/task-create",
        method: "post",
        data: data,
    });
}

// 任务重做
export function apiTaskRedo(data) {
    return request({
        url: "/monitor/task-redo",
        method: "post",
        data: data,
    });
}

// 获取作业的当前任务
export function apiTaskCurrent(data) {
    return request({
        url: "/monitor/task-current",
        method: "post",
        data: data,
    });
}

// 查询作业组的当前任务
export function apiTaskCurrentGroup(data) {
    return request({
        url: "/monitor/task-current-group",
        method: "post",
        data: data,
    });
}

// 停止任务组下各任务	/monitor/task-group-stop
export function apiTaskGroupStop(data) {
    return request({
        url: "/monitor/task-group-stop",
        method: "post",
        data: data,
    });
}

// 刷新任务	/monitor/task-refresh
export function apiTaskRefresh(data) {
    return request({
        url: "/monitor/task-refresh",
        method: "post",
        data: data,
    });
}
